import store from "@/store";

export default {
  data() {
    return {};
  },
  methods: {
    checkPerm(str) {
      const userInfo = store.state.user.userInfo;
      if (userInfo && userInfo.permission_btn_list.length) {
        const arr = userInfo.permission_btn_list.map((item) => {
          return item.permission_mark;
        });
        console.log(arr);
        return arr.includes(str);
      } else {
        return false;
      }
    },
  },
};
